package com.gzsxy.esjy.service.netty.mybatis.handler;


import com.gzsxy.esjy.common.base.result.ResultCodeEnum;
import lombok.Data;

/**
 * 文件上传异常分析
 */
@Data
public class GuliEception extends RuntimeException{

    private Integer code;


    //RuntimeException父类里面定义了message对象
    public GuliEception(String message, Integer code) {
        super(message);
        this.code = code;
    }

     public GuliEception(ResultCodeEnum resultCodeEnum) {
        super(resultCodeEnum.getMessage());
        this.code = resultCodeEnum.getCode();
    }

    @Override
    public String toString() {
        return "GuliEception{" +
                "code=" + code +
                "message=" + this.getMessage()+
                '}';
    }
}
